package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.OrderCategoryMapper;
import com.ruoyi.system.domain.OrderCategory;
import com.ruoyi.system.service.IOrderCategoryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 订单品类 服务层实现
 * 
 * @author ruoyi
 * @date 2019-08-07
 */
@Service
public class OrderCategoryServiceImpl implements IOrderCategoryService 
{
	@Autowired
	private OrderCategoryMapper orderCategoryMapper;

	/**
     * 查询订单品类信息
     * 
     * @param id 订单品类ID
     * @return 订单品类信息
     */
    @Override
	public OrderCategory selectOrderCategoryById(Long id)
	{
	    return orderCategoryMapper.selectOrderCategoryById(id);
	}
	
	/**
     * 查询订单品类列表
     * 
     * @param orderCategory 订单品类信息
     * @return 订单品类集合
     */
	@Override
	public List<OrderCategory> selectOrderCategoryList(OrderCategory orderCategory)
	{
	    return orderCategoryMapper.selectOrderCategoryList(orderCategory);
	}
	
    /**
     * 新增订单品类
     * 
     * @param orderCategory 订单品类信息
     * @return 结果
     */
	@Override
	public int insertOrderCategory(OrderCategory orderCategory)
	{
	    return orderCategoryMapper.insertOrderCategory(orderCategory);
	}
	
	/**
     * 修改订单品类
     * 
     * @param orderCategory 订单品类信息
     * @return 结果
     */
	@Override
	public int updateOrderCategory(OrderCategory orderCategory)
	{
	    return orderCategoryMapper.updateOrderCategory(orderCategory);
	}

	/**
     * 删除订单品类对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteOrderCategoryByIds(String ids)
	{
		return orderCategoryMapper.deleteOrderCategoryByIds(Convert.toStrArray(ids));
	}
	
}
